home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor2
/
roldx32.doc
< prev
next >
Wrap
Text File
|
1995-03-31
|
14KB
|
345 lines
(Comp.sources.hp48)
Item: 110 by jweisbin@cix.compulink.co.uk
Author: [James Weisbin]
Subj: Roldx v3.2
Date: Fri May 22 1992
version 3.2 01-05-92
[Note: This is an upgrade to Jim's ROLDX on Goodies Disk #6. -jkh-]
Roldx for the HP48 by James Weisbin, portions of code by
Simone Rapisarda, Jim Cloos, and Rick Grevelle
Revisions to Roldx version 3.2 from version 3.1:
1. When inserting items from the stack, the stk-> routine
left the item on the stack - this has been changed to
delete the item from the satck, if the item was inserted
successfully, which is more practical.
Revisions to Roldx version 3.1 from version 3.0:
1. Multiple data lists can be maintained, and switched to
easily, using the DATA function.
2. Some bugs fixed, especially password/lock functions which
didn't work (sorry).
Revisions to Roldx version 3.0 from version 2.0:
1. Items in list can have as many fields as you like
(but only 7 can be displayed, or 8 with the menu
line turned off).
2. Display routine uses machine-language "MDISP", by
Rick Grevelle, for much faster display.
3. Password protection is available for individual
items using machine-language "CODER" routine, by
Simone Rapisarda and Jim Cloos.
4. The menu line can be turned off to see one extra
line, for a total of 8 lines.
5. Extensive rewriting, optimization, and use of the
machine-language "UPCASE" program, has resulted in
faster search speeds. (There is still some room for
improvement, though).
6. Status menu rewritten with graphic icon-like
symbols.
7. Many error traps have been added, so user can break
out of searches and text entry, for example, without
quitting the program.
WARNING: The machine language routines used here have not
been written by me and have only been tested on my Rev B
HP48SX - no guarantees are made that they will work on any
machine.
Yet another rolodex program for the HP48. After sampling
the various rolodex-type programs out there, I decided I
needed to write my own. This one is written entirely in
user code, with the exception of the MDISP program,by
Rick Grevelle, the CODER program, by Simone Rapisarda and
Jim Cloos, and the UPCASE program, author unknown.
Overall it is not as fast as some of the of the other
roldx programs, but it has many features that others lack,
like the ability to view only the "headings" of up to 8
entries at once (in fact, any line number can be selected),
password protection for individual items, etc.
PICT is not used, so it is not overwritten, and keeps
the speed up to a reasonable standard. The database
structure is "free form" in the sense that you can store
anything you like on any line, an "item" being a collection
of fields in a list. Up to seven fields of 22 characters
each can be displayed, or eight fields if the menu line
is turned off. If a line contains more than 22 characters,
it will be truncated (well, you can't have everything!).
The 48 can display 7 lines of text quickly with a minimum
of fuss and I find this to be adequate room to store name,
address, phone, fax, and email data. The program is
distributed as a directory. Make sure the Roldx directory
is your current directory, then press ROLDX to start.
You will see a screen with all 7 lines of the current item,
which will be one of two items when you first start the program.
You can't delete the first item if there are no others, but
you can edit it (or exit the program, put the list on the
stack, and edit it using normal HP48 methods). You will
also see a menu with the following items:
FIND FIND text prompted for. If one character only,
only the 1st character of the line selected
is checked for a match. If more than one
character, a match is sought in any
position. Only the line number set by the
variable rdLINE is searched. Case is ignored in
the search (all text is temporarily converted
to uppercase by the UPCASE routine). If lock
mode is "on" (flag 39 clear) then password
protected items won't be found.
STATUS find out about and change settings. Brings up
the following menu:
LINE? |---> ==== >-- ? DATA MAIN
the first menu key prompts you for the line
number to search, and display if flag 34 is
set.
the second key controls the search mode (flag
33) whether the database is searched from the
top or from the current item to the end.
the third menu key toggles the display mode
(flag 34) - whether one line of each item, or
7 or 8 lines of current item are displayed.
the fourth menu key (picture above is supposed
to look like a key) toggles password mode. When
toggling it "on" you will be prompted for the
password. There is no "wrong" password, but
your data will be garbled unless you use the
same one you used when you encoded it.
the fifth menu key (DATA) allows you to select
a name from the list rdLIST. You must add the
names of all data lists to this list though,
while outside of the ROLDX program.
the last menu key returns you to the main
screen.
HELP brings up a short help screen.
->STK put the current item on the stack.
STK-> insert an item from the stack. (Must be a list
with at least 1 item).
EXIT quit this program.
In addition to the menu keys above, the following key-
presses are supported:
right-arrow, down-arrow, NEXT next item.
up-arrow, left arrow, PREV previous item.
left-shift right-arrow & down-arrow next 7th (or 8th)
item.
left-shift left-arrow & up-arrow prev 7th (or 8th)
item.
right-shift right-arrow & down-arrow go to last item.
right-shift left-arrow & up-arrow go to first
(top) item.
ENTER toggle flag 34 display mode - see
below.
EDIT
or +/- all lines must be processed, an empty
string is ok. Pressing the ATTN (ON)
key quits edit mode, discarding all
input.
+ add an item after the current item.
* turn off the menu bar, so up to 8
lines can be displayed (see flag 32
below)
DEL or - delete the current item (you can't
delete 1 of 1)
right-shift OFF pauses program and turns the machine
off, turning password protection
(lock mode) back on in the process.
The machine will beep when re-
shift-PRINT print current item.
any other key exit program.
There is no sorting provided, but you can use ->STK,
STK->, and DEL to move things around. (If you have
Donnelly's Toolkit library, you can use LSORT - see
below). The data format makes it fairly easy to transfer
data to a PC and edit it there - you must use ascii mode
to transfer it.
The following global variables must be present in the
current directory, and are provided with the listing.
However, with the exception of rdLIST, they are hidden.
To unhide them, execute #15777h SYSEVAL PURGE while in
the Roldx directory. Normally, you should not need to
unhide them.
rdLIST a list containing names of any data lists you
want to choose from. Any number of names can
be in the list, but only up to 6 names can
be displayed by Roldx.
rdNAME a global containing another global which points
to the roldx data list. For example, if the
name of your data list is LIST1, then 'rdNAME'
should contain the global 'LIST1', *not* the
list itself! This way, you can maintain
several databases, storing their names in
rdNAME as and when needed. The format of the
data list is a list of lists, each inner list
containing at least 1 item, which can be an
empty string. The program will not create a
new list if one is not present, so you should
modify the one I have provided, called
LIST1. The data list must be in the Roldx
directory!!!
rdSIZ the number of entries (lists) in the data list.
rdPOS number of the current item to display.
rdLINE number of the line to search on, and the number
of the line which gets displayed when
displaying only the headings (flag 34 set).
rdTXT the last text sought by the FIND command (can
be a null string).
The settings of user flags 32, 33, 34, 35, 36 & 39 are as
follows - use the STATUS menu key to enter status mode
and change the settings (changing the flags outside the
program will have no effect):
Flag 32 if clear, the menu line is displayed, plus (up
to) 7 lines of text. If set, the menu line is
not displayed, allowing 8 lines of text.
Flag 33 if clear, the FIND command searches from the
current position in the list, if set, it
searches from the beginning, which can be very
slow for large databases. Note that only the
line number in rdLINE is searched (searching
all lines would be too slow - perhaps a future
PDL version will overcome this).
Flag 34 if clear, display all lines of each item, if
set, display only one line of each item, for a
total of seven items on each screen, or eight
if the menu line is off. With flag 34 set, the
line displayed for each item is the value of
rdLINE. When flag 34 is set, using left-shift-
arrows will scroll ahead or back by exactly 7
(flag 32 clear) or 8 (flag 32 set) items.
Flag 35-36 temporary flags for various operations.
Flag 39 when clear, lock mode is on and individual
items which are password protected will appear
garbled. When set (this must be done from the
status menu, and the password given), the items
will be readable only if the password given was
the correct one, otherwise they will appear
garbled.
All flags default to clear when Roldx is started.
The programs HELP, STATUS, and DATA will also work when
outside of the ROLDX program, however, if you use STATUS
on its own, then some of the settings reflected or changed
will not take effect while inside Roldx, since all flag
settings default to the values listed above when running
the program. Also, if you hit the LOCK key, and give a
password, this password will be stored in a global variable
'pwrd' and will NOT be purged until the next time that you
run Roldx. Therefore, it is advisable that you purge the
variable yourself, or run Roldx immediately, to ensure that
noone has access to your password.
Miscellaneous notes:
Some of the routines are appropriate for general use.
These are as follows (see note above to unhide):
CODER Written by Simone Rapisarda and Jim Cloos.
Put string to encode or decode in level 2,
password string in level one.
bell an error bell - edit to anything you want, as
long as it can be evaluated.
UPcase change case of characters between "a" and "z"
to uppercase. Machine language routine by
unknown author (my apologies).
MDISP written by Rick Grevelle. String to display in
level 2 (must be a string) and line number in
level one. Will overwrite the menu line if the
number is 6 or greater (numbers start at 0).
As noted above, if you want to sort the data list, you
can use Donnelly's LSORT. Put the list on the stack and
press OBJ->, then enter the number of the line you want
to sort on (usually will be 1), then press LSORT from the
TLLIB menu. Note that this will sort on the first
letter(s) of each line so it is not really appropriate if
you put surnames last (in other words, if you put
surnames last, you will be sorting on first names).
You can edit each item outside of the ROLDX program by
using ->STK, then edit it with the normal 48 object
editor, then run ROLDX again and use STK->. If the stack
does not contain a list with at least 1 item, an error
will be generated.
Some may ask why I put the program's dynamic parameters
(like dPOS, for example) in separate global variables,
rather than in a parameter list. The answer is SPEED! The
48 can evaluate a global variable at least twice as fast
as GETting a list item, and this can make a big
difference to a program written in RPL. A future version
of this program might be written in PDL, but don't hold
your breath.
I personally don't see the usefulness of compiling this
into a library, but it should be do-able, providing the
variables rdXXX mentioned above are in the $VAR list used
by USRLIB.
This program makes use of machine language routines which
have not been written by me, and may not work on every
machine. The program is free and distributed as-is - use
at your own risk - I make no warranties or guarantees of
any kind.
James Weisbin 73457.3462@compuserve.com
END_DOC